/* Copyright  2009
   @Author
   Richard Changde Yin            e-mail yinchangde@hotmail.com

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; version 2 of the License.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
   
/**
 * @filename:    function/math/abs.h
 */ 

#ifndef COLLAPSAR_FUNCTION_MATH_ABS_H
#define COLLAPSAR_FUNCTION_MATH_ABS_H

#include <function/func.h>
#include <function/num1.h>

class Item_func_abs :public Item_func_num1
{
public:
  Item_func_abs(Item *a) :Item_func_num1(a) {}
  
  double real_op();
  
  int64_t int_op();
  
  my_decimal *decimal_op(my_decimal *);
  
  const char *func_name() const { return "abs"; }
  
  void fix_length_and_dec();
  
  bool check_vcol_func_processor(unsigned char *)
  { return false; }

};

#endif /* COLLAPSAR_FUNCTION_MATH_ABS_H */
